Package-level declarations

Types

Link copied to clipboard

Defines how the camera preview is scaled within its available bounds.

Link copied to clipboard

State used to take pictures from a DocumentScanScreen.

Functions

Link copied to clipboard
fun BarcodeScanScreen(modifier: Modifier = Modifier, supportedCodeTypes: Set<Barcode.Type> = EnumSet.allOf(Barcode.Type::class.java), previewScaleType: PreviewScaleType = PreviewScaleType.FIT, overlayColor: Color = Color.Blue, onBarcodesDetected: (codes: List<SpatialBarcode>) -> Unit = { _ -> }, onBarcodeDetectionFailed: (Exception) -> Unit = { _ -> }, onDetectorInitializationFailed: (Exception) -> Unit = { _ -> }, onCameraReady: () -> Unit = {}, onCameraFailure: (Exception) -> Unit = {})

Displays a camera preview that detects barcodes and draws their bounds and values.

Link copied to clipboard
fun DocumentScanScreen(modifier: Modifier = Modifier, state: ScanScreenState = rememberScanScreenState(), isDetectionEnabled: Boolean = true, flashMode: FlashMode = FlashMode.AUTO, jpegQuality: Int = DEFAULT_JPEG_QUALITY, previewScaleType: PreviewScaleType = PreviewScaleType.FIT, shutterAnimationEnabled: Boolean = false, overlayColor: Color = Color.Blue, autoTriggerAnimationEnabled: Boolean = false, onBorderDetectionResult: (QuadStreamAnalyzer.Result) -> Unit = { _ -> }, onBorderDetectionFailure: (Exception) -> Unit = { _ -> }, onCameraReady: () -> Unit = {}, onCameraFailure: (Exception) -> Unit = {}, onShutterTriggered: () -> Unit = {})

Displays a camera preview that detects documents and draws their boundaries.

Link copied to clipboard
Link copied to clipboard
suspend fun ScanScreenState.takePicture(outputFile: File)

Takes a picture and writes its JPEG bytes to outputFile.